#include "ObjectManager.h"
#include <vector>


CObjectManager::CObjectManager()
{
	m_mapMap = CMap(80,24);
	//map = std::vector<int>();
	//for(int i = 0; i < 1920; i++)
		//map.push_back((int)' ');
	m_nPlayerX = m_mapMap.getWidth() / 2;
	m_nPlayerY = m_mapMap.getHeight() / 2;
}

CObjectManager::~CObjectManager()
{
}

void CObjectManager::movePlayer(int xdelta, int ydelta)
{
	if(m_nPlayerX + xdelta >= m_mapMap.getWidth() || m_nPlayerX + xdelta < 0)
		m_nPlayerX += 0;
	else
		m_nPlayerX += xdelta;
	if(m_nPlayerY + ydelta >= m_mapMap.getHeight() || m_nPlayerY + ydelta < 0)
		m_nPlayerY += 0;
	else
		m_nPlayerY += ydelta;                    
}
